.notebook {
    /* Notebook panel element styles */
    .row { padding: 0 1em;}
    section {
        background-color: #{$gray-800};
        border-radius: 10px;
        box-shadow: 0 1px 2px var(--shadow-2);
        overflow: auto;
        margin: 1rem auto;
        @extend .px-4;
        @extend .py-3;
    }

    section > h1 {
        padding-bottom: 0.5em;
        display: flex;
        align-items: center;
    }
    section > h1 > span.material-symbols-outlined {
        margin-right: 0.5em;
        font-size: inherit;
        margin-bottom: 5px;
    }
    section > h2 {
        padding: 1em 0em 0.5em;
    }
    section > form {
        padding: 1em 0px 0.5em;
    }
    /* Tables, sticky headers, overflow scroll, rounded corners, stripes and highlights */
    table {
        border-collapse: separate;
        border-spacing: 0;
        display: block;
        max-width: fit-content;
        max-height: 80vh;
        margin: 0 auto;
        overflow: auto;
        white-space: nowrap;
    }
    table tr th {
        position: sticky;
        top: 0;
        background-color: var(--color-9);
    }
    table tr th,
    table tr td {
        border-right: 1px solid var(--gray-8);
        border-bottom: 1px solid var(--gray-8);
        padding: 8px 12px;
    }
    table tr th:first-child,
    table tr td:first-child {
        border-left: 1px solid var(--gray-8);
    }
    table tr th:first-child,
    table tr td:first-child {
        border-left: 1px solid var(--gray-8);
    }
    table tr th {
        text-align: left;
        border: 0.5px solid var(--gray-8);
    }
    table tr:first-child th:first-child {
        border-top-left-radius: 4px;
    }
    table tr:first-child th:last-child {
        border-top-right-radius: 4px;
    }
    table tr:last-child td:first-child {
        border-bottom-left-radius: 4px;
    }
    table tr:last-child td:last-child {
        border-bottom-right-radius: 4px;
    }
    table thead tr {
        background-color: var(--color-9);
        font-weight: 500;
        text-align: left;
    }
    table tbody tr:nth-child(even) {
        background-color: var(--color-9);
    }
    table tbody tr:hover {
        background-color: var(--color-8);
    }

    /* Body */
    .success {
        color: var(--highlite-green);
    }

    dl {
        display: flex;
        flex-flow: column wrap;
        max-height: 2em;
    }
    dt {
        font-weight: 300;
        text-transform: uppercase;
        margin: 0 10px;

    }
    dd {
        margin: 0 10px;
    }
    sub, sup {
        font-size: 60%;
        line-height: 0;
        position: relative;
    }
    sup {
        top: -0.5em;
    }
    sub {
        bottom: -0.25em;
    }

    b {
        font-weight: bolder;
    }


    ol.object_list {
        width: 100%;
    }
    ol.object_list li {
        width: 100%;
    }
    ol.object_list h3 {
        display: inline;
        padding-top: 0.5em;
        height: 2.5em;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    ol.object_list li {
        display: flex;
    }
    ol.object_list li a {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        justify-content: space-between;
        width: 100%;
        height: 2em;
        position: relative;
        margin: 0 -30px;
        padding: 0;
    }
    ol.object_list li a:hover {
        height: 2em;
        background-color: var(--color-8);
    }
    ol.object_list li a::after {
        content: '❯';
        color: var(--gray-7);
        margin: 0 0 0 1em;
    }
    ol.object_list li span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    ol.object_list li span:nth-child(1) {
        margin: 0;
    }

    ol.project_list li span:nth-child(1) {
        flex-grow: 10;
    }
    ol.project_list li span:nth-child(2) {
        width: 10em;
        text-align: right;
    }


    ol.model_list li:nth-child(1) span {
        height: 2.5em;
        padding-top: 1em;
    }
    ol.model_list li:nth-child(1) span:nth-child(3) {
        text-align: center;
    }
    ol.model_list li:nth-child(1) span b {
        position: relative;
        top: 0.4em;
    }
    ol.model_list li span:nth-child(1) {
        width: 1.5em;
    }
    ol.model_list li span:nth-child(2) {
        width: 30em;
    }
    ol.model_list li span:nth-child(3) {
        width: 6em;
        text-align: right;
    }
    ol.model_list li figure {
        width: 50%;
        height: 2em;
        margin: 0 0 0 1em;
    }

    ol.snapshot_list li a span:nth-child(1) {
        flex-grow: 10;
    }

    ol.snapshot_list li a span:nth-child(2) {
        width: 5em;
        text-align: right;
    }

    ol.deployment_list li a span:nth-child(1) {
        width: 1em;
    }
    ol.deployment_list li a span:nth-child(2) {
        width: 10em;
        flex-grow: 10;
    }
    ol.deployment_list li a span:nth-child(3) {
        width: 10em;
        text-align: right;
    }

    body.models figure {
        width: 20vmin;
        height: 20vmin;
    }

    .ide .query_list a {
    overflow: hidden;
    text-overflow: ellipsis;
    }

    .ide .query_list code {
    font-size: smaller;
    }

    /*
    * Notebook styles
    */

    nav ol, nav ul {
    list-style: none;
    }

    .notebook-title {
        padding: 1rem 3rem;
        margin: 20px auto 20px auto;
    }

    .notebook-cell.active {
    border: 1px solid var(--gray-8);
    padding: 0;
    }

    .notebook-cell-edit {
    margin-bottom: 1rem;
    }

    .hidden {
    display: none;
    }

    main turbo-frame:first-of-type .notebook-cell {
        border-radius: 10px 10px 0px 0px;
        border-top: 1px solid var(--gray-8);
    }

    .notebook-cell {
    margin: .5rem auto;
    border-radius: 8px;
    padding: 1rem 3rem;
    border: 1px solid rgba(255,255,255,0);
    }

    .notebook-last-cell {
        border-radius: 0px 0px 10px 10px;
    }

    .notebook-cell:hover {
    border: 1px solid rgba(255,255,255,0.3);
    }

    .notebook-cell.selected {
        border-left: 2px solid var(--highlite-green);
    }

    .notebook-cell.notebook-delete-undo {
        border-left: 2px solid var(--highlite-red);
    }

    .notebook-cell-edit {
        background: var(--gray-10);
    }


    .notebook-buttons {
        display: flex;
        flex-direction: row;
        gap: 0.2rem;
    }

    .notebook-contents code {
    font-family: monospace;
    }

    .margin-right-1 {
    margin-right: 1rem;
    }

    .margin-left-1 {
    margin-left: 1rem;
    }

    .flex {
    display: flex;
    }

    .flex-grow {
    flex-grow: 1;
    }

    .flex-center {
    align-items: center;
    }

    .flex-end {
    align-items: flex-end;
    }

    .flex-start {
        align-items: flex-start;
    }

    .flex-row-reverse {
    flex-direction: row-reverse;
    }

    .notebook-cell .cell-number {
    margin-right: 1rem;
    font-family: monospace;
    }

    .notebook-cell button, .notebook-title button, .markdown-body button {
    padding: 2px 5px;
    height: 2rem;
    }

    .notebook-cell .button-delete {
    margin-left: 1rem;
    }

    .notebook-cell select {
    font-weight: bold;
    background: rgb(240, 240, 240);
    border: 1px solid var(--gray-7);
    height: 2rem;
    border-radius: 2px;
    }

    .notebook-duration {
    margin-top: 1rem;
    }

    .notebook-render-container {
        min-width: 0px;
        flex: 1;
        margin-right: 1rem;
    }

    .notebook-rendering .markdown-body {
        margin-top: 1rem;
    }

    .notebook-rendering {
        max-width: 80vw;
    }

    .markdown-body.notebook-contents {
    margin-bottom: 1rem;
    }

    /*
    * Customize editor
    */
    .CodeMirror {
    font-size: 1rem;
    border: 1px solid var(--gray-8);
    border-radius: 8px;
    }

    /*
    * Uploader
    */
    body.uploader section p, body.uploader section li {
    margin: 0.5rem 0;
    }

    body.uploader section ol, body.uploader section ul {
    margin: 1rem 0;
    }

    body.uploader section .markdown-body{
    margin: 1rem 0;
    }

    body.uploader ul {
    list-style-type: disc;
    list-style-position: inside;
    }

    body.uploader ol {
    list-style-type: decimal;
    list-style-position: inside;
    }

    body.uploader section li {
    margin-left: 1rem;
    }

    body.uploader strong {
    font-weight: bold;
    }

    body.uploader label {
    user-select: none;
    cursor: pointer;
    }

    /*
    * Checkbox
    */
    input[type=checkbox] {
        /* Reset style */
        appearance: none;

        background: transparent;
        border: 1px solid var(--gray-5);

        height: 1.6em;
        width: 1.6em;

        border-radius: 3px;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;

        cursor: pointer;

        color: #{$gray-100};
        border: 1px solid $gray-100;
        border-radius: 4px;
        padding: 10px;
    }

    input[type=checkbox]:checked:after {
        content: '\2714';
        font-size: 1em;
        position: absolute;
        color: var(--highlite-green);
        filter:  brightness(0.75);
    }

    .nav {
        display: flex;
        justify-content: space-between;
    }

    .li {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ul {
        display: flex;
        align-items: center;
    }


    @media only screen and (max-width: 690px) {
        header {
            top: unset;
            left: 0;
            bottom: 0;
            position: fixed;
            border: 0;
            padding: 0;
            width: 100%;
        }
        header nav a {
            font-size: 0;
        }
        header nav ul li.logo {
            display: none;
        }
        header nav ul li {
            width: 24%;
            padding: 15px 0;
            text-align: center;
        }
        header nav a span.material-symbols-outlined {
            font-size: inherit;
        }
        dl {
            max-height: 6em;
        }
        dt {
            margin-top: 1em;
        }
        dt, dd {
            margin-right: 2em;
        }
        figure {
            display: inline-block;
            width: 75vmin;
            height: 75vmin;
            margin: 30px 0;
        }
        section {
            border-radius: 0;
            margin: 0 0 20px;
        }
        main turbo-frame:first-of-type .notebook-cell {
            border-radius: 0px;
        }
        .notebook-last-cell {
            border-radius: 0px;
        }
        .notebook-buttons {
            flex-direction: column;
            justify-content: flex-start;
        }
    }

    @media only screen and (max-width: 300px) {
        dl {
            max-height: 12em;
        }
        dt {
            margin-top: 1em;
        }
        dt, dd {
            margin-right: 2em;
        }
    }

}
